package com.webtech.chidiya;

import com.webtech.chidiya.R;

import android.content.Context;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;


public class SettingPrefs extends PreferenceActivity {
   // Option names and default values
   private static final String OPTION_SOUND = "sound_effect";
   private static final boolean OPTION_SOUND_DEFAULT = true;
  
   private static final String OPTION_LEVEL = "game_level";
   private static final String OPTION_LEVEL_DEFAULT = "easy_game";

   @Override
   protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      addPreferencesFromResource(R.xml.preferences);
   }

   
   /** Get the current value of the music option */
   public static boolean getSoundEffect(Context context) {
      return PreferenceManager.getDefaultSharedPreferences(context)
            .getBoolean(OPTION_SOUND, OPTION_SOUND_DEFAULT);
   }
   
   public static String getGameLevel(Context context) {
	      return PreferenceManager.getDefaultSharedPreferences(context)
	            .getString(OPTION_LEVEL, OPTION_LEVEL_DEFAULT);
	   }
   
//   /** Get the current value of the hints option */
//   public static boolean getHints(Context context) {
//      return PreferenceManager.getDefaultSharedPreferences(context)
//            .getBoolean(OPTION_LEVEL, OPTION_LEVEL_DEFAULT);
//   }
   
}

